const mongoose = require('mongoose')

const hostname = "localhost"
const port = 27017
const dbName = "wh2214"

const CONN_DB_URL = `mongodb://${hostname}:${port}/${dbName}`

mongoose.connect(CONN_DB_URL, (err) => {
    if (err) {
        console.log("数据库链接失败了")
        console.log(err)
    } else {
        console.log("数据库链接成功")
    }
})